package com.design.twords.utils;

import com.design.twords.config.ConstantValue;

import java.io.IOException;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Create by Alen
 * Time:  15:03
 */
public class HttpHelper {

    public static String requestResult(String url){
        OkHttpClient okHttpClient = new OkHttpClient();
        Request request =new Request.Builder()
                .url(url)
                .build();
        try {
            Response response =okHttpClient.newCall(request).execute();
            return response.body().toString();
        } catch (IOException e) {
            e.printStackTrace();
            return e.toString();
        }

    }
}
